home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
util
/
misc
/
fwasynprnt.lha
/
asynprnt.fwrx
Wrap
Text File
|
1995-07-21
|
2KB
|
77 lines
/* AsyncPrint.fwrx
**
** Brian Gragg 7/20/95
**
** Script to print Asyncronously using FinalWriter.
**
** The script first asks then saves your file. It then loads up another
** copy of the file, shrinks the new winow, and load the print requester.
** You can print or cancel, then the new window is closed. You can edit
** The original while the print is taking place.
**/
OPTIONS RESULTS
'ShowMessage 1 0 "Asyncronous Printing:"
" This will save the file to the name shown in"
" the titlebar or it will ask if no name is defined."
"Okay" "Cancel" ""'
IF RESULT ~= 1 THEN EXIT
/* save the file first, to the default name or ask FOR one */
'Save'
/* get the portname for the original document */
'Status PortName'
originalPort = RESULT
/* get the filename that is was saved as */
'Status PathName'
file = RESULT
/*****************************************************************************/
/* The Next block of code is needed to determine the portname of the window that
was just opened. Softwood should fix this one!! */
olist = Show('P',,'\')
fwlist = ''
DO UNTIL olist=''
PARSE VAR olist name '\' olist
IF Left(name,7)="FINALW." THEN fwlist = fwlist || ' ' || name
END
/* open a secod copy of the document */
'Open ' file
portname = ""
DO UNTIL (portname ~= "" | loops = 10)
/* Since Open returns before the port is ready, we need to wait a second */
CALL Delay(50)
nlist = Show('P',,'\')
portname = ''
DO UNTIL portname~='' | nlist=''
PARSE VAR nlist name '\' nlist
IF Left(name,7)="FINALW." THEN
IF 0=Find(fwlist,name) THEN portname=name
END
END
IF portname='' THEN
DO
'ShowMessage 1 1 "Error finding the" "ARexx Port name" "" "OK" "" ""'
EXIT 0
END
/******* okay, we've got the new portname now, lets switch to it **********/
ADDRESS Value portname
/* make it small and out of the way */
'ChangeWindow 0 0 160 101'
/* bring up the print requester , It's up to you to toggle back to the
original document to edit it*/
'Print PROMPT'
'Close FORCE'